Skip to content

Better import error #6072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 27, 2013
Merged

Better import error #6072

merged 2 commits into from
Apr 27, 2013

Conversation

emberian
Copy link
Member

No description provided.

I didn't know how to use "use" initially, and an error message like this would
have solved quite a bit of frustration. I think this properly handles cases
where it's not appropriate but I'm not sure.
@bstrie
Copy link
Contributor

bstrie commented Apr 26, 2013

What sort of errors does this trigger on? Can you provide a test case?

@emberian
Copy link
Member Author

Literally a testcase, in the test suite? Otherwise, afaik, it only triggers when you have:

use foo;

which is invalid (I think it is, anyway, not sure, 🆕bie. Currently reported as "unresolved import"), but will NOT trigger on

use foo::bar;

which is valid, but if bar doesn't exist is reported as "failed to resolve imports", and if foo doesn't exist an additional error is reported, "unresolved name", although the span is wrong... I'll open an issue for that.

@bstrie
Copy link
Contributor

bstrie commented Apr 26, 2013

Ah, I see. Seems innocuous enough to not need a test (not even sure how you'd test this in the first place).

@bstrie
Copy link
Contributor

bstrie commented Apr 26, 2013

r+

@bors bors closed this Apr 27, 2013
@bors bors merged commit 8dd9dc9 into rust-lang:incoming Apr 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants